package com.massyframework.beanskin.maven.plugin.util;

import javax.crypto.Cipher;

import org.apache.commons.codec.binary.Hex;
import org.junit.Test;

public class CertificateTester {

	@Test
	public void test_Key() throws Exception{
		String strKey ="e3476908d02c26266699639ad4c8d8c0";
		byte[] key = Hex.decodeHex(strKey);
		System.err.println("key:" + Hex.encodeHexString(key));
		
		BouncycastleUtils.init();
		Cipher cipher = BouncycastleUtils.createEncryptCipher(key);
		String md5 ="88bf53218da5aaffa3604227ccb2c385";
		byte[] data = BouncycastleUtils.encrypt(cipher, md5);
		System.err.println(Hex.encodeHexString(data));		
		
	}
	
}
